﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutForLoggedIn.cshtml";
}

  <!--motha fokker  -->
<div id="LeftInnranet">
    <!--Kóði sem er fenginn að hluta til af http://youtu.be/hRIJlhOOdHc -->
    <fieldset id="News">
        <legend>Fréttaveita</legend>
        <div id="NewsFeed">
            <input id="TextInput" type="text" placeholder="Hvað segiru gott í dag?"/>
            <input id="ButtonSubmit" type="button" value="Senda"/>
            <fieldset id="NewsMessage">
                <legend>Skilaboð</legend>
                <ul id="MessageBoard">
                    <li id="Messages"></li>
                </ul>
            </fieldset>
          </div>
    </fieldset>        
    </div>

<!-- SignalR code -->
<!--<script type="text/javascript" src="SignalR/Hubs"></script>-->

<script>
    $(function () {
        var group = "smuu";
        var smu = $.connection.chatHub;

 /*
        chat.client.writeMessage = function (message) {
            $("#Messages").before("<li>" + message + "</li>");
        };*/

        $.connection.smu.start().done(function () {
            smu.server.join(group);

            /*------------chat--------------*/
            $("#ButtonSubmit").click(function () {
                alert("moo");
                smu.server.sendMessage(group, $("#TextInput").val());
                $("#Messages").before('<li>' + $("#TextInput").val() + '</li>');
            });
        });
    });
</script>





    <div id="RightInnranet">
      <div id="NewGames">
        <h2>Nýleg virkni</h2>
        <img src="http://pumpuptheprofit.com/wp-content/uploads/2013/04/UnknownCopyrightLicence.png" alt="Game"/>
        <img src="http://pumpuptheprofit.com/wp-content/uploads/2013/04/UnknownCopyrightLicence.png" alt="Game"/>
        <img src="http://pumpuptheprofit.com/wp-content/uploads/2013/04/UnknownCopyrightLicence.png" alt="Game"/>
      </div>
      <div id="PopularGames">
        <h2>Vinsælast</h2>
        <img src="http://pumpuptheprofit.com/wp-content/uploads/2013/04/UnknownCopyrightLicence.png" alt="Game"/>
        <img src="http://pumpuptheprofit.com/wp-content/uploads/2013/04/UnknownCopyrightLicence.png" alt="Game"/>
        <img src="http://pumpuptheprofit.com/wp-content/uploads/2013/04/UnknownCopyrightLicence.png" alt="Game"/>
      </div>
      <div id="Top10">
        <h2>Top 10 spilarar</h2>
        <table>
          <tr>
            <td>1</td>
            <td>Nafn Leikmanns</td>
            <td>High Score</td>
          </tr>
          <tr>
            <td>2</td>
            <td>Nafn Leikmanns</td>
            <td>High Score</td>
          </tr>
          <tr>
            <td>3</td>
            <td>Nafn Leikmanns</td>
            <td>High Score</td>
          </tr>
          <tr>
            <td>4</td>
            <td>Nafn Leikmanns</td>
            <td>High Score</td>
          </tr>
          <tr>
            <td>5</td>
            <td>Nafn Leikmanns</td>
            <td>High Score</td>
          </tr>
          <tr>
            <td>6</td>
            <td>Nafn Leikmanns</td>
            <td>High Score</td>
          </tr>
          <tr>
            <td>7</td>
            <td>Nafn Leikmanns</td>
            <td>High Score</td>
          </tr>
          <tr>
            <td>8</td>
            <td>Nafn Leikmanns</td>
            <td>High Score</td>
          </tr>
          <tr>
            <td>9</td>
            <td>Nafn Leikmanns</td>
            <td>High Score</td>
          </tr>
          <tr>
            <td>10</td>
            <td>Nafn Leikmanns</td>
            <td>High Score</td>
          </tr>
        </table>
      </div>
    </div>

